﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Design;

namespace RatingHelper.Controls
{
    public partial class TitledComboBox : UserControl
    {
        public TitledComboBox()
        {
            InitializeComponent();
        }

        public CheckBox TitledCheckBox
        {
            get
            {
                return this.titleCheckBox;
            }
        }

        public ComboBox ContextComboBox
        {
            get
            {
                return this.contextComboBox;
            }
        }

        public string TitleText
        {
            get
            {
                return this.titleLabel.Text;
            }
            set
            {
                this.titleLabel.Text = value;
            }
        }

        public bool CheckBox
        {
            get
            {
                return this.titleCheckBox.Visible;
            }
            set
            {
                this.titleCheckBox.Visible = value;
            }
        }

        public int TitleWidth
        {
            get
            {
                return titleLabel.Width;
            }
            set
            {
                titleLabel.Width = value;
            }
        }

        public bool Checked
        {
            get
            {
                return titleCheckBox.Checked;
            }
            set
            {
                titleCheckBox.Checked = value;
            }
        }

        [Editor("System.Windows.Forms.Design.ListControlStringCollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public ComboBox.ObjectCollection ContextItems
        {
            get
            {
                return this.contextComboBox.Items;
            }
        }

        public object ContextDataSource
        {
            get
            {
                return this.contextComboBox.DataSource;
            }
            set
            {
                this.contextComboBox.DataSource = value;
            }
        }
    }
}
